﻿Imports System.ComponentModel

Public Class TestForm
    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        Me.StartLocation = LocationMode.Center
        Me.AutoOffGradientOnAero = False
        'This will make sure that the white texts are shown properly in groupbox1
        For Each Label In GetAType(Of Label)(GroupBox1)
            CompleteHide(Label)
        Next
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Text = Me.CreateArray(Of String)("Wrong Test", "Right Test")(1)
        P.SelectedObject = Me
        BackgroundControl = New Control() {GroupBox1}
        AddMovableControl(ProgressBar1)
        AddAeroMovableControl(PictureBox2)
        ShowLabel(Label1)
        ShowLabel(Label3)
        PictureBox1.Image = Me.RealIcon.ToBitmap
    End Sub
    Public Overrides Sub ResetAeroBackground()
        ExcludeControlFromAero(Panel2, , False)
    End Sub
    Private Sub TestBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TestBtn.Click
        SelectControl("TestBtn").text = "Test is right!"
    End Sub


    Private Sub Form1_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
        P.Width = Me.Width - Panel1.Width - 20
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Visible = False
        T1.Enabled = True
    End Sub


    Private Sub P_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles P.PropertyValueChanged
        T1.Enabled = True
    End Sub
    <Description("Invertal of Reshow Timer."),
    DefaultValue(1500), Category("Behavior")>
    Property DelayBeforeShow As Integer
        Get
            Return T1.Interval
        End Get
        Set(ByVal value As Integer)
            T1.Interval = value
        End Set
    End Property
    Private Sub T1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles T1.Tick
        Me.Show()
        T1.Enabled = False
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Close()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Test2.Show()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        GTest.Show()
    End Sub
End Class
